package com.cskaoyan.mapper;

import com.cskaoyan.bean.MarketOrder;
import com.cskaoyan.bean.MarketOrderExample;
import com.cskaoyan.bean.vo.StatOrderVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Repository
public interface MarketOrderMapper {
    long countByExample(MarketOrderExample example);

    int deleteByExample(MarketOrderExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketOrder record);

    int insertSelective(MarketOrder record);

    List<MarketOrder> selectByExample(MarketOrderExample example);

    MarketOrder selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketOrder record, @Param("example") MarketOrderExample example);

    int updateByExample(@Param("record") MarketOrder record, @Param("example") MarketOrderExample example);

    int updateByPrimaryKeySelective(MarketOrder record);

    int updateByPrimaryKey(MarketOrder record);

    int updateWithOptimisticLocker(@Param("lastUpdateTime") Date lastUpdateTime, @Param("order") MarketOrder order);

    void updateStatueAndRefundPrice(@Param("id") Integer id, @Param("goodsPrice") BigDecimal goodsPrice);

    void updateStatueByShip(@Param("id") Integer id, @Param("shipChannel") String shipChannel, @Param("shipSn") String shipSn);

    void updateByDelete(@Param("orderId") Integer orderId);

    //新增的 永健写的
    List<StatOrderVo> orderGroupByDate();

    Integer selectUnpaid(@Param("id") Integer id);

    Integer selectUnship(@Param("id") Integer id);

    Integer selectUnrecv(@Param("id") Integer id);

    Integer selectUncomment(@Param("id") Integer id);
}
